#!/bin/bash

if [ -f video_trans.pid ]; then
    PID=$(cat video_trans.pid)
    if ps -p $PID > /dev/null; then
        echo "Stopping Video Translation Service (PID: $PID)..."
        kill $PID
        rm video_trans.pid
        echo "Service stopped"
    else
        echo "Process not running"
        rm video_trans.pid
    fi
else
    echo "PID file not found"
fi 